import { createRouter, createWebHistory } from 'vue-router'
import HomeView from '@/views/frontdesk/home/HomeView.vue'
import EditView from '@/views/backstage/article/edit.vue'
import AmisPage from '@/views/backstage/amis-page/index.vue'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path: '/',
      name: 'home',
      component: HomeView,
    },
    {
      path: '/backstage',
      name: 'backstage',
      children: [
        {
          path: 'amis',
          name: 'amis',
          component: AmisPage,
        },
        {
          path: '/edit',
          name: 'edit',
          component: EditView,
        }
      ],
    },
  ],
})

export default router
